﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSP.Common.IProviders
{
    public abstract class OtherApiProvider
    {
        public abstract string AccessToken{get;set;}


        public abstract string Uid { get; protected set; }
        /// <summary>
        /// 请求API登陆授权
        /// </summary>
        /// <returns></returns>
        public abstract void RequestApiAuthorization(string backUrl);

        /// <summary>
        /// 根据请求的Code值，和重定向的Uri获取用户基本信息
        /// </summary>
        /// <param name="code"></param>
        /// <param name="redirectUri"></param>
        /// <param name="openId"></param>
        /// <returns></returns>
        public abstract Dictionary<string, string> GetUserInfo(string code, string redirectUri,string openId="");

        /// <summary>
        ///Api事件处理管道“关注/微博”
        /// </summary>
        /// <param name="isPublish"></param>
        /// <param name="isAttention"></param>
        public abstract void EventHandling(bool isPublish, bool isAttention);
    }
}
